package com.platform.enums;

import com.platform.comm.enums.IDictEntry;
import com.platform.comm.enums.IEnumItem;

/**
 * 业务类型
 *
 * @author qijunyu
 */
public enum OperationType implements IDictEntry, IEnumItem {

    /**
     * 新增
     */
    insert("insert", "新增"),

    /**
     * 修改
     */
    update("update", "修改"),

    /**
     * 删除
     */
    delete("delete", "删除"),

    /**
     * 关联同步
     */
    sync("operationType","关联同步"),

    /**
     * 无效
     */
    invalid("invalid", "无效"),

    batchDelete("batchDelete", "批量删除");


    public final String code;
    public final String title;

    OperationType(String code, String title) {
        this.code = code;
        this.title = title;
    }

    @Override
    public boolean is(String iCode) {
        return code.equals(iCode);
    }

    @Override
    public String getKey() {
        return code;
    }

    @Override
    public String getValue() {
        return title;
    }

    @Override
    public Object getData() {
        return this;
    }

}
